home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swags_z.zip / SCROLL.SWG / 0008_BIG Scroller - NEAT!.pas < prev    next >
Pascal/Delphi Source File  |  1994-01-27  |  1KB  |  47 lines

  1. {
  2. I'm not sure if there're people who are still searching for a _big_ scroll
  3. (meaning bigger than just one line). If so, here's some source:
  4.  
  5. { --- cut here --- }
  6.  
  7. program Simple_Old_TextScroll;
  8.  
  9. uses crt;
  10. const Sseg : word = $b800; Hi = 17; Txt : string = 'Hello world...      ';
  11. var Fseg,Fofs : word; I,Cur,Idx,Line,BitPos : byte;
  12.  
  13. procedure Getfont; assembler; asm
  14.   mov ax,1130h; mov bh,3; int 10h; mov Fseg,es; mov Fofs,bp; end;
  15.  
  16. procedure Retrace; assembler; asm
  17.   mov dx,3dah;
  18.   @l1: in al,dx; test al,8; jnz @l1;
  19.   @l2: in al,dx; test al,8; jz @l2; end;
  20.  
  21. begin
  22.   GetFont;
  23.   Idx := 1;
  24.   repeat
  25.     Cur := ord(Txt[Idx]);
  26.     for BitPos := 0 to 7 do begin
  27.       for Line := 0 to 7 do begin
  28.         if ((mem[Fseg:Fofs+Cur*8+Line] shl BitPos) and 128) <> 0 then
  29.           mem[Sseg:158+(Line+Hi)*160] := 219
  30.         else
  31.           mem[Sseg:158+(Line+Hi)*160] := 32;
  32.       end;
  33.       Retrace;
  34.       for Line := 0 to 7 do
  35.         for I := 0 to 78 do
  36.           mem[Sseg:(Line+Hi)*160+I+I] := mem[Sseg:(Line+Hi)*160+I+I+2];
  37.  
  38.     end;
  39.     Idx := 1+Idx mod length(Txt);
  40.   until keypressed;
  41. end.
  42.  
  43. { --- cut here --- }
  44.  
  45. Keep in mind this thing expects a VGA card with the textmemory at $b800.
  46.  
  47.